#include <iostream>
#include <unistd.h>

using namespace std;

int main(int argc, char* argv[]) {
  cout << "_SC_ARG_MAX:        " << sysconf(_SC_ARG_MAX) << endl;
  cout << "_SC_CLK_TCK:        " << sysconf(_SC_CLK_TCK) << endl;
  cout << "_SC_LOGIN_NAME_MAX: " << sysconf(_SC_LOGIN_NAME_MAX) << endl;
  cout << "_SC_OPEN_MAX:       " << sysconf(_SC_OPEN_MAX) << endl;
  cout << "_SC_NGROUPS_MAX:    " << sysconf(_SC_NGROUPS_MAX) << endl;
  cout << "_SC_PAGESIZE:       " << sysconf(_SC_PAGESIZE) << endl;
  cout << "_SC_RTSIG_MAX:      " << sysconf(_SC_RTSIG_MAX) << endl;
  cout << "_SC_SIGQUEUE_MAX:   " << sysconf(_SC_SIGQUEUE_MAX) << endl;
  cout << "_SC_STREAM_MAX:     " << sysconf(_SC_STREAM_MAX) << endl;
  char curDir[300];
  getcwd(curDir, 300);
  cout << "_PC_NAME_MAX:       " << pathconf(curDir, _PC_NAME_MAX) << endl;
  cout << "_PC_PATH_MAX:       " << pathconf(curDir, _PC_PATH_MAX) << endl;
  cout << "_PC_PIPE_BUF:       " << pathconf(curDir, _PC_PIPE_BUF) << endl;

  cout << "argv[0]: " << argv[0] << endl;
  *argv[0] = 'c';
  cout << "argv[0]: " << argv[0] << endl;

  return 0;
}
